import Ember from 'ember';

export default Ember.Route.extend({
  model() {
    var userState = this.get('userState'),
        user = userState.get('user');

    if (user) {
      return this.store.query("keypair", {});
    } else {
      return this.store.peekAll('keypair');
    }
  }
});
